#!/usr/bin/env bash

function dc_h_main(){
    ctnName=$1
    lines=$2

    case $# in
     0)
        echo -e 'Usage:dc-h ctnName [lines]'
        ;;
     1)
        docker logs $ctnName | head
        ;;
     2)
        docker logs $ctnName | head -n $lines
        ;;
    esac
}

dc_h_main $*